package com.clw.repository;

import com.clw.dataobject.PurchaseOrder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by Administrator on 2018-03-01.
 */
public interface PurchaseOrderRepository extends JpaRepository<PurchaseOrder,Integer> {

    Page<PurchaseOrder> findAll(Specification<PurchaseOrder> spec, Pageable pageable);

    Long count(Specification<PurchaseOrder> spec);

    List<PurchaseOrder> findAllByStatus(Integer status);
}
